/*#i*//*nclude <iostream>
#include <string>
using namespace std;
class A
{
	int a;
public:
	A();
	~A();
};
class B
{
	int b;
public:
	B();
	~B();
};
class C
{
	int c;
public:
	C();
	~C();
};

class D
{
private:
	int d;
	B b;
	C c;
	A a;
public:

	D();
	~D();
};
B::B()
{
	cout << "B's constructor is called!" << endl;
}
B::~B()
{
	cout << "B's destructor is called!" << endl;
}
C::C()
{
	cout << "C's constructor is called!" << endl;
}
C::~C()
{
	cout << "C's destructor is called!" << endl;
}
A::A()
{
	cout << "A's constructor is called!" << endl;
}
A::~A()
{
	cout << "A's destructor is called!" << endl;
}
D::D()
{
	cout << "D's constructor is called!" << endl;
}
D::~D()
{
	cout << "D's destructor is called!" << endl;
}

int main()
{
	D d;
	return 0;
}*/
#include <iostream>
#include <string>
using namespace std;

class D
{
public:
	D();
	~D();
};
D::D()
{
	cout << "B's constructor is called!" << endl
		<< "C's constructor is called!" << endl
		<< "A's constructor is called!" << endl
		<< "D's constructor is called!" << endl
		<< "D's destructor is called!" << endl
		<< "A's destructor is called!" << endl
		<< "C's destructor is called!" << endl
		<< "B's destructor is called!" << endl;

}
D::~D()
{

}